package com.liner.homework.third.person;


public class Teacher extends Person {

    private double salary;

    public Teacher(String name, int age, String address, double salary) {
        super(name, age, address);
        this.salary = salary;
    }

    public void teach() {
        System.out.println(getName() + "正在教学...");
    }

    @Override
    public void sayHi() {
        super.sayHi();
        System.out.println("我的工资是:" + salary);
    }

    public double getSalary() {
        return salary;
    }

    public void setSalary(double salary) {
        this.salary = salary;
    }
}
